import request from "@/router/axios";
import { baseUrl } from "@/config/env";

export const getfacilitylist = (data) =>
  request({
    url: baseUrl + "/api/aircraft",
    method: "get",
    params: data,
  });

//查询设备
export const getcraftlist = (data) =>
  request({
    url: baseUrl + "/api/craft/station",
    method: "get",
    params: data,
  });
// ID查询设备
export const craftId = (data) =>
  request({
    url: baseUrl + "/api/craft",
    method: "get",
    params: data,
  });
// 修改用户
export const eidParm = (list) =>
  request({
    url: baseUrl + "/api/craft/parm",
    method: "put",
    data: list,
  });
export const eidaircraft = (list) =>
  request({
    url: baseUrl + "/api/aircraft",
    method: "put",
    data: list,
  });
// 删除用户
export const dleaircraft = (list) =>
  request({
    url: baseUrl + "/api/aircraft",
    method: "delete",
    data: list,
  });
// 查询角色
export const rconfig = () =>
  request({
    url: baseUrl + "/api/craft/config",
    method: "get",
  });
export const addaircraft = (list) =>
  request({
    url: baseUrl + "/api/aircraft",
    method: "post",
    data: list,
  });
export const addCraft = (list) =>
  request({
    url: baseUrl + "/api/craft",
    method: "post",
    data: list,
  });

export const aircraftStart = (list) =>
  request({
    url: baseUrl + "/api/aircraft/start",
    method: "post",
    data: list,
  });

export const AircraftList = (data) =>
  request({
    url: baseUrl + "/api/routes/aircraft",
    method: "get",
    params: data,
  });

export const ftidList = (data) =>
  request({
    url: baseUrl + "/api/aircraft/ft_id",
    method: "get",
    params: data,
  });
